﻿{include file="public/header"}
<title>订单列表</title>
</head>
<style>
    .layui-layer-page .layui-layer-content {
        overflow: visible !important;
    }

</style>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> 统计管理
    <span class="c-gray en">&gt;</span>统计列表
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
       href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container">
    <form method="get">
        <div class="text-c">
            时间:
            <input type="text" name="start_time" id="countTimestart" onfocus="selecttime(1)" size="17"
                   class="date input-text " readonly style="width:100px"
                   value="{$data['start_time'] ?? ''}">
            -
            <input type="text" name="end_time" id="countTimeend" onfocus="selecttime(2)" size="17"
                   class="date input-text" readonly style="width:100px"
                   value="{$data['end_time'] ?? ''}">
            <span class="select-box inline" style="border: none">
            <select name="city_id" class="form-control" style="float: left;padding: 3px">
                <option value="">搜索城市</option>
 <option value="">搜索城市</option>
                {volist name='city' id='v'}
               <option value="{$v.city_id}" <?php if( isset($data['city_id']) && $data["city_id"]==$v['city_id']){?> selected="selected" <?php }?> >{$v.city}</option>
                {/volist}
            </select>

            </span>
            <span class="select-box inline">
		<select name="store_id" class="select">
			<option value="" selected>分店</option>
            {volist name='l' id='v'}
              <option value="{$v.store_id}"  <?php if( isset($data['order_store']) && $data["order_store"]==$v['store_id']){?> selected="selected" <?php }?>>{$v.store_name}</option>
       {/volist}
        </select>
                 </span>
            <span class="select-box inline">
		<select name="user_id" class="select">
			<option value="" selected>店长</option>
            {volist name='user' id='v'}
            <option value="{$v.user_id}"  <?php if( isset($data['user_id']) && $data["user_id"]==$v['user_id']){?> selected="selected" <?php }?>>{$v.username}</option>
       {/volist}
        </select>
                 </span>
            <button class="btn btn-success" type="submit"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>


        </div>


    </form>
    <a href="{:Url('index/Export/cityStoreManagerReceivesOrders')}?start_time={$data['start_time'] ?? ''}&end_time={$data['end_time'] ?? ''}&city_id={$data['city_id'] ?? ''}&user_id={$data['user_id'] ?? ''}&store_id={$data['store_id'] ?? ''}" style="text-decoration:none" class="ml-5 dao"  title="导出"><span class="label label-primary">导出</span></a>
    <div class="mt-20">
        <table class="table table-border table-bordered table-bg table-hover table-sort">
            <thead>
            <tr class="text-c">
                <th width="80">时间</th>
                <th width="80">城市</th>
                <th width="80">门店</th>
                <th width="50">店长</th>
                <th width="50" >接单量</th>
                <th width="50">上门量</th>
                <th width="50">上门率</th>
                <th width="50">远程沟通</th>
                <th width="50">远程沟通率</th>
                <th width="50">成交量</th>
                <th width="50">成交额</th>
                <th width="50">上门成交率</th>
                <th width="50">订单成交率</th>
                <th width="50">客单价</th>
            </tr>
            </thead>
            <tbody>
            {volist name='list' id='vo'}
            <tr class="text-c">

                <td>{$vo.posttime}</td>
                <td>{$vo.city}</td>
                <td>{$vo.store_name}</td>
                <td>{$vo.username}</td>
                <td>{$vo.order}</td>
                <td>{$vo.dealCount}</td>
                <td>{$vo.doorToDoorRate}</td>
                <td>{$vo.through}</td>
                <td>{$vo.throughCount}</td>
                <td>{$vo.signUp}</td>
                <td>{$vo.turnover}</td>
                <td>{$vo.doorToDoorTransactionRate}</td>
                <td>{$vo.orderTurnoverRate}</td>
                <td>{$vo.turnoverS}</td>




            </tr>
            {/volist}
            </tbody>
        </table>
        <div class="pages" style="float: right">{$list->render()}</div>

    </div>
</div>

{include file="public/footer"}
<script type="text/javascript">
    function selecttime(flag) {
        if (flag == 1) {
            var endTime = $("#countTimeend").val();
            if (endTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', maxDate: endTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        } else {
            var startTime = $("#countTimestart").val();
            if (startTime != "") {
                WdatePicker({dateFmt: 'yyyy-MM-dd', minDate: startTime})
            } else {
                WdatePicker({dateFmt: 'yyyy-MM-dd'})
            }
        }
    }
    /**
     * 详情
     */
    $('.info').click(function () {
        var id = $(this).attr('data-id');
        var src = "{:Url('index/order/info')}";
        var index=layer.open({
            type: 2,
            area: ['100%', '100%'],
            fix: false,
            shade: 0.4,
            title: '订单详情',
            content: src + '?order_id=' + id
        });
        layer.full(index);
    });


</script>
</body>
</html>